package com.woniu51.k15demo.service;

import com.github.pagehelper.PageInfo;
import com.woniu51.k15demo.entity.Manager;
import com.woniu51.k15demo.entity.Permission;
import com.woniu51.k15demo.entity.Role;
import com.woniu51.k15demo.vo.*;

import java.util.List;

public interface ManagerService {
    String doLogin(LoginDto loginDto);

    PageInfo<Permission> queryPermissionWithPage(Integer pageNum, Integer pageSize, String name);

    List<Permission> queryFirstLevelPermission();


    void addPermission(PermissionDto permissionDto);

    PageInfo<Role> queryRoleWithPage(Integer pageNum, Integer pageSize, String name);

    void addRole(RoleDto roleDto);

    Role getRoleById(Long id);

    void editRole(RoleDto roleDto);

    List<PermissionTree> queryPermissionTreeLevel1();


    RoleVo getRoleAndPermissionsById(Long id);

    void deleteByRoleId(Long id);

    PageInfo<ManagerVo> queryManagerWithPage(Integer pageNum, Integer pageSize, String userName);

    List<Role> queryAllRoles();


    Manager queryManagerById(Long id);

    List<Long> queryRoleIdListByManagerId(Long id);

    void editUser(ManagerDto managerDto);

    List<PermissionTree> queryPermissionsByManagerId(Long userId);

}
